package com.vrv.vap.baseline.service.impl;

import com.vrv.vap.baseline.config.ExcelTemplateConfig;
import com.vrv.vap.baseline.entity.ActReDeployment;
import com.vrv.vap.baseline.mapper.ActReDeploymentMapper;
import com.vrv.vap.baseline.service.AbstractExcelExportService;
import com.vrv.vap.baseline.util.FileOperationUtil;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

@Service
public class ActReDeploymentExportService extends AbstractExcelExportService<ActReDeployment> {
    private final ActReDeploymentMapper actReDeploymentMapper;

    public ActReDeploymentExportService(FileOperationUtil fileOperationUtil,
                                      ExcelTemplateConfig excelTemplateConfig,
                                      ActReDeploymentMapper actReDeploymentMapper) {
        super(fileOperationUtil, excelTemplateConfig, "act_re_deployment");
        this.actReDeploymentMapper = actReDeploymentMapper;
    }

    @Override
    protected List<ActReDeployment> getAllData() {
        return actReDeploymentMapper.selectAll();
    }

    @Override
    protected void processData(List<ActReDeployment> dataList, String format) throws IOException {
        // 如果需要对数据进行额外处理，可以在这里实现
    }

    @Override
    protected Class<ActReDeployment> getEntityClass() {
        return ActReDeployment.class;
    }
}